/*
 * @Description:
 * @Author: lz
 * @Date: 2022-12-22 20:06:19
 * @LastEditTime: 2022-12-30 21:19:13
 * @LastEditors: lz
 */
import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/layout'
Vue.use(Router)

export const routes = [
  {
    path: '/home/center',
    name: '项目中心',
    roleType: 0,
    meta: { title: '项目中心', icon: 'home-icon' },
    component: () => import('@/views/home/index.vue'),
  },
  {
    path: '/home/detail',
    name: '项目详情',
    roleType: 0,
    meta: { title: '项目详情', hidden: true },
    component: () => import('@/views/home/detail.vue'),
  },
  {
    path: '/user/info',
    name: '项目详情',
    roleType: 0,
    meta: { title: '修改资料', hidden: true },
    component: () => import('@/views/user/index.vue'),
  },
  {
    path: '/user/info',
    name: '项目详情',
    roleType: 1,
    meta: { title: '修改资料', hidden: true },
    component: () => import('@/views/user/index.vue'),
  },
  {
    path: '/my/manage',
    name: '我管理的项目',
    roleType: 0,
    meta: { title: '我管理的项目', icon: 'manage-icon' },
    component: () => import('@/views/manage/index.vue'),
  },
  {
    path: '/my/manage/proDetail',
    name: '管理项目',
    roleType: 0,
    meta: { title: '管理项目', hidden: true },
    component: () => import('@/views/manage/proDetail.vue'),
  },
  {
    path: '/my/manage/consultReview',
    name: '会商会审',
    roleType: 0,
    meta: { title: '会商会审', hidden: true },
    component: () => import('@/views/manage/consultReview.vue'),
  },
  {
    path: '/my/manage/proInfo',
    name: '查看更多',
    roleType: 0,
    meta: { title: '查看更多', hidden: true },
    component: () => import('@/views/manage/proInfo.vue'),
  },
  {
    path: '/my/manage/problemDetail',
    name: '问题详情',
    roleType: 0,
    meta: { title: '问题详情', hidden: true },
    component: () => import('@/views/manage/problemDetail.vue'),
  },
  {
    path: '/organizing/dbproblem',
    name: '问题协办',
    roleType: 0,
    meta: { title: '问题协办', icon: 'problem-icon' },
    component: () => import('@/views/dbproblem/index.vue'),
  },
  {
    path: '/organizing/problem',
    name: '问题协办',
    roleType: 1,
    meta: { title: '问题协办', icon: 'problem-icon' },
    component: () => import('@/views/problem/index.vue'),
  },
  {
    path: '/assistance/process',
    name: '流程协助',
    roleType: 1,
    meta: { title: '流程协助', icon: 'process-icon' },
    component: () => import('@/views/process/index.vue'),
  },
  {
    path: '/configuration/process',
    name: '流程配置',
    roleType: 1,
    meta: { title: '流程配置', hidden: true },
    component: () => import('@/views/processConfig/index.vue'),
  },
  {
    path: '/configure/batch',
    name: '报批计划配置',
    roleType: 1,
    meta: { title: '报批计划配置', hidden: true },
    component: () => import('@/views/batch/index.vue'),
  },
  {
    path: '/log/work',
    name: '工作日志',
    roleType: 0,
    meta: { title: '工作日志', icon: 'work-icon' },
    component: () => import('@/views/work/index.vue'),
  },
  {
    path: '/evaluation/intermediary',
    name: '掌上中介评价',
    roleType: 1,
    meta: { title: '掌上中介评价', icon: 'intermediary-icon' },
    component: () => import('@/views/intermediary/index.vue'),
  },
  {
    path: '/evaluation/review',
    name: '查看评价',
    roleType: 0,
    meta: { title: '中介评价', hidden: true },
    component: () => import('@/views/intermediary/review.vue'),
  },
  {
    path: '/event',
    name: '项目办结事项',
    roleType: 0,
    meta: { title: '项目办结事项', icon: 'intermediary-icon' },
    component: () => import('@/views/event/index.vue'),
  },
]
export default new Router({
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: '/home/center',
      children: routes,
    },
    {
      path: '/login',
      name: '登录',
      component: () => import('@/views/login/index.vue'),
    },
  ]
})
